#pragma once

#include <boost/shared_ptr.hpp>
#include "utils.h"

namespace Broady {

class Listener
{
public:
	bool SendPacket( boost::shared_ptr<client_t> client, const char* packet, unsigned int len, unsigned short port );
	bool SendBroadcast( boost::shared_ptr<client_t> client, const char* packet, unsigned int len, unsigned short port );
	bool Read( boost::shared_ptr<client_t> client );

protected:
	bool Parse( boost::shared_ptr<client_t> client, boost::shared_ptr<unsigned char> packet, unsigned int len, unsigned long ip, unsigned short port );
};

} // namespace
